#!/bin/bash
read -p 'input the env:' env
ids=$(ps -ef | grep '/data/wangqian/.virtualenvs/'$env'/bin/python' | grep -v grep | awk '{print $2}')

if [ "$ids" == "" ]
then
  echo "process not exists!"
  exit 0
else
  echo $ids
  read -p "kill those pids? yes/no?  " order
  if [ "$order" == "yes" ]
  then
    echo 'prepare to kill pids ...'
    kill -9 $ids
  else
    exit 0
  fi
fi
